/*
 * Selling Partner API for Orders
 *
 * Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools.   _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
 *
 * The version of the OpenAPI document: v0
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.orders.v0
{
    /// <summary>
    /// The reason for rejecting the order&#39;s regulated information. This is only present if the order is rejected.
    /// </summary>
    [DataContract(Name = "RejectionReason")]
    public partial class RejectionReason : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="RejectionReason" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected RejectionReason() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="RejectionReason" /> class.
        /// </summary>
        /// <param name="rejectionReasonId">The unique identifier for the rejection reason. (required).</param>
        /// <param name="rejectionReasonDescription">The description of this rejection reason. (required).</param>
        public RejectionReason(string rejectionReasonId = default(string), string rejectionReasonDescription = default(string))
        {
            // to ensure "rejectionReasonId" is required (not null)
            if (rejectionReasonId == null)
            {
                throw new ArgumentNullException("rejectionReasonId is a required property for RejectionReason and cannot be null");
            }
            this.RejectionReasonId = rejectionReasonId;
            // to ensure "rejectionReasonDescription" is required (not null)
            if (rejectionReasonDescription == null)
            {
                throw new ArgumentNullException("rejectionReasonDescription is a required property for RejectionReason and cannot be null");
            }
            this.RejectionReasonDescription = rejectionReasonDescription;
        }

        /// <summary>
        /// The unique identifier for the rejection reason.
        /// </summary>
        /// <value>The unique identifier for the rejection reason.</value>
        [DataMember(Name = "RejectionReasonId", IsRequired = true, EmitDefaultValue = true)]
        public string RejectionReasonId { get; set; }

        /// <summary>
        /// The description of this rejection reason.
        /// </summary>
        /// <value>The description of this rejection reason.</value>
        [DataMember(Name = "RejectionReasonDescription", IsRequired = true, EmitDefaultValue = true)]
        public string RejectionReasonDescription { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class RejectionReason {\n");
            sb.Append("  RejectionReasonId: ").Append(RejectionReasonId).Append("\n");
            sb.Append("  RejectionReasonDescription: ").Append(RejectionReasonDescription).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
